package com.itheima.tlias.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class InsertStudentParam {
    private int id;
    @NotNull(message = "姓名不能为空")
    @Length(min = 2,max = 10,message = "长度为2-10字节之间")
    private String name;
    @NotNull(message = "学号不能为空")
    private String no;
    private Integer clazzId;
    private String gender;
    @Length(max = 100,message = "最大长度为100位")
    private String address;
    @Length(min = 18,max = 18,message = "身份证号码长度为18位")
    @Pattern(regexp = "^\\d{17}(\\d|X|x)$",message = "身份证格式有误")
    private String idCard;
    @Length(min = 11,max = 11,message = "手机号长度必须为11位")
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号格式错误")
    private String phone;
    private Integer degree;
    private Integer isCollege;
    private String graduationDate;
}
